var hammingWeight = function (n) {
    let count = 0;
    while (n !== 0) {
        count += n & 1; // 判断最低位是否为1
        n = n >>> 1; // 无符号右移，将最低位移出
    }
    return count;
};